#include <stdio.h>
#include <stdlib.h>
#include "pac_object.h"
#include "pac_ghost.h"
#include "pac_values.h"

PacGhost* pacGhostCreate(float posX, float posY, int isIntelligent) {
    PacGhost *pacGhost;

    // Allocation des ressources nécessaires à l'objet
    pacGhost = (PacGhost*) malloc(sizeof (PacGhost));

    pacGhost->pacObject = pacObjectCreate(posX, posY);

    pacGhost->isIntelligent = isIntelligent;

    pacGhost->isGoingToHome = FALSE;

    pacGhost->isVulnerable = FALSE;

    pacGhost->targetPosX = posX;
    pacGhost->targetPosY = posY;

    return pacGhost;
}

void replaceGhostToInitialPosition(PacGhost * aPacGhost) {
    replaceObjectToInitialPosition(aPacGhost->pacObject);
}
